package com.sims.action.manager;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Student;
import com.sims.service.ManagerService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

public class FindStudentAction extends ActionEnhanced {
	private List<Student> students;
	@Autowired
	private ManagerService managerService;
	
	public List<Student> getStudents() {
		return students;
	}

	public void setStudents(List<Student> students) {
		this.students = students;
	}

	@Override
	public String execute() {
		result = managerService.findStudent(students);
		if (result.containsKey(Constant.SUCCESS)) {
			return SUCCESS;
		}
		return ERROR;
	}
}
